package org.lc.service.system.feign;


import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.lc.platform.base.result.Result;
import org.lc.service.system.entity.SysLogger;
import org.lc.service.system.service.SysLoggerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(value = "/feign/logger")
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@Tag(name = "LoggerFeign|提供微服务调用接口")
@Hidden()
@RefreshScope
public class LoggerFeign {
    private final SysLoggerService sysLoggerService;

    @GetMapping(value = "/save")
    @Operation(summary = "保存日志信息")
    public Result<Boolean> save(@RequestBody SysLogger logger) {
        return Result.data(sysLoggerService.createBaseOne(logger));
    }
}
